3.760 \(\int \frac{(a+i a \tan (e+f x))^3 (A+B \tan (e+f x))}{\sqrt{c-i c \tan (e+f x)}} \, dx\)

Optimal. Leaf size=140 \[ \frac{2 a^3 (5 B+i A) (c-i c \tan (e+f x))^{3/2}}{3 c^2 f}-\frac{8 a^3 (2 B+i A) \sqrt{c-i c \tan (e+f x)}}{c f}-\frac{8 a^3 (B+i A)}{f \sqrt{c-i c \tan (e+f x)}}-\frac{2 a^3 B (c-i c \tan (e+f x))^{5/2}}{5 c^3 f} \]

[Out]

(-8*a^3*(I*A + B))/(f*Sqrt[c - I*c*Tan[e + f*x]]) - (8*a^3*(I*A + 2*B)*Sqrt[c - I*c*Tan[e + f*x]])/(c*f) + (2*
a^3*(I*A + 5*B)*(c - I*c*Tan[e + f*x])^(3/2))/(3*c^2*f) - (2*a^3*B*(c - I*c*Tan[e + f*x])^(5/2))/(5*c^3*f)

________________________________________________________________________________________

Rubi [A]  time = 0.185085, antiderivative size = 140, normalized size of antiderivative = 1., number of steps used = 3, number of rules used = 2, integrand size = 43, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.047, Rules used = {3588, 77} \[ \frac{2 a^3 (5 B+i A) (c-i c \tan (e+f x))^{3/2}}{3 c^2 f}-\frac{8 a^3 (2 B+i A) \sqrt{c-i c \tan (e+f x)}}{c f}-\frac{8 a^3 (B+i A)}{f \sqrt{c-i c \tan (e+f x)}}-\frac{2 a^3 B (c-i c \tan (e+f x))^{5/2}}{5 c^3 f} \]

Antiderivative was successfully verified.

[In]

Int[((a + I*a*Tan[e + f*x])^3*(A + B*Tan[e + f*x]))/Sqrt[c - I*c*Tan[e + f*x]],x]

[Out]

(-8*a^3*(I*A + B))/(f*Sqrt[c - I*c*Tan[e + f*x]]) - (8*a^3*(I*A + 2*B)*Sqrt[c - I*c*Tan[e + f*x]])/(c*f) + (2*
a^3*(I*A + 5*B)*(c - I*c*Tan[e + f*x])^(3/2))/(3*c^2*f) - (2*a^3*B*(c - I*c*Tan[e + f*x])^(5/2))/(5*c^3*f)

Rule 3588

Int[((a_) + (b_.)*tan[(e_.) + (f_.)*(x_)])^(m_.)*((A_.) + (B_.)*tan[(e_.) + (f_.)*(x_)])*((c_) + (d_.)*tan[(e_
.) + (f_.)*(x_)])^(n_.), x_Symbol] :> Dist[(a*c)/f, Subst[Int[(a + b*x)^(m - 1)*(c + d*x)^(n - 1)*(A + B*x), x
], x, Tan[e + f*x]], x] /; FreeQ[{a, b, c, d, e, f, A, B, m, n}, x] && EqQ[b*c + a*d, 0] && EqQ[a^2 + b^2, 0]

Rule 77

Int[((a_.) + (b_.)*(x_))*((c_) + (d_.)*(x_))^(n_.)*((e_.) + (f_.)*(x_))^(p_.), x_Symbol] :> Int[ExpandIntegran
d[(a + b*x)*(c + d*x)^n*(e + f*x)^p, x], x] /; FreeQ[{a, b, c, d, e, f, n}, x] && NeQ[b*c - a*d, 0] && ((ILtQ[
n, 0] && ILtQ[p, 0]) || EqQ[p, 1] || (IGtQ[p, 0] && ( !IntegerQ[n] || LeQ[9*p + 5*(n + 2), 0] || GeQ[n + p + 1
, 0] || (GeQ[n + p + 2, 0] && RationalQ[a, b, c, d, e, f]))))

Rubi steps

\begin{align*} \int \frac{(a+i a \tan (e+f x))^3 (A+B \tan (e+f x))}{\sqrt{c-i c \tan (e+f x)}} \, dx &=\frac{(a c) \operatorname{Subst}\left (\int \frac{(a+i a x)^2 (A+B x)}{(c-i c x)^{3/2}} \, dx,x,\tan (e+f x)\right )}{f}\\ &=\frac{(a c) \operatorname{Subst}\left (\int \left (\frac{4 a^2 (A-i B)}{(c-i c x)^{3/2}}-\frac{4 a^2 (A-2 i B)}{c \sqrt{c-i c x}}+\frac{a^2 (A-5 i B) \sqrt{c-i c x}}{c^2}+\frac{i a^2 B (c-i c x)^{3/2}}{c^3}\right ) \, dx,x,\tan (e+f x)\right )}{f}\\ &=-\frac{8 a^3 (i A+B)}{f \sqrt{c-i c \tan (e+f x)}}-\frac{8 a^3 (i A+2 B) \sqrt{c-i c \tan (e+f x)}}{c f}+\frac{2 a^3 (i A+5 B) (c-i c \tan (e+f x))^{3/2}}{3 c^2 f}-\frac{2 a^3 B (c-i c \tan (e+f x))^{5/2}}{5 c^3 f}\\ \end{align*}

Mathematica [A]  time = 7.09158, size = 152, normalized size = 1.09 \[ -\frac{2 a^3 \sqrt{c-i c \tan (e+f x)} (\cos (e+4 f x)+i \sin (e+4 f x)) (A+B \tan (e+f x)) ((25 A-38 i B) \tan (e+f x)+\cos (2 (e+f x)) ((25 A-41 i B) \tan (e+f x)+55 i A+71 B)+60 i A+87 B)}{15 c f (\cos (f x)+i \sin (f x))^3 (A \cos (e+f x)+B \sin (e+f x))} \]

Antiderivative was successfully verified.

[In]

Integrate[((a + I*a*Tan[e + f*x])^3*(A + B*Tan[e + f*x]))/Sqrt[c - I*c*Tan[e + f*x]],x]

[Out]

(-2*a^3*(Cos[e + 4*f*x] + I*Sin[e + 4*f*x])*(A + B*Tan[e + f*x])*Sqrt[c - I*c*Tan[e + f*x]]*((60*I)*A + 87*B +
 (25*A - (38*I)*B)*Tan[e + f*x] + Cos[2*(e + f*x)]*((55*I)*A + 71*B + (25*A - (41*I)*B)*Tan[e + f*x])))/(15*c*
f*(Cos[f*x] + I*Sin[f*x])^3*(A*Cos[e + f*x] + B*Sin[e + f*x]))

________________________________________________________________________________________

Maple [A]  time = 0.115, size = 135, normalized size = 1. \begin{align*}{\frac{2\,i{a}^{3}}{f{c}^{3}} \left ({\frac{i}{5}}B \left ( c-ic\tan \left ( fx+e \right ) \right ) ^{{\frac{5}{2}}}-{\frac{5\,i}{3}}B \left ( c-ic\tan \left ( fx+e \right ) \right ) ^{{\frac{3}{2}}}c+{\frac{Ac}{3} \left ( c-ic\tan \left ( fx+e \right ) \right ) ^{{\frac{3}{2}}}}+8\,iB{c}^{2}\sqrt{c-ic\tan \left ( fx+e \right ) }-4\,A{c}^{2}\sqrt{c-ic\tan \left ( fx+e \right ) }-4\,{\frac{{c}^{3} \left ( A-iB \right ) }{\sqrt{c-ic\tan \left ( fx+e \right ) }}} \right ) } \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((a+I*a*tan(f*x+e))^3*(A+B*tan(f*x+e))/(c-I*c*tan(f*x+e))^(1/2),x)

[Out]

2*I/f*a^3/c^3*(1/5*I*B*(c-I*c*tan(f*x+e))^(5/2)-5/3*I*B*(c-I*c*tan(f*x+e))^(3/2)*c+1/3*A*(c-I*c*tan(f*x+e))^(3
/2)*c+8*I*B*c^2*(c-I*c*tan(f*x+e))^(1/2)-4*A*c^2*(c-I*c*tan(f*x+e))^(1/2)-4*c^3*(A-I*B)/(c-I*c*tan(f*x+e))^(1/
2))

________________________________________________________________________________________

Maxima [A]  time = 1.20867, size = 153, normalized size = 1.09 \begin{align*} -\frac{2 i \,{\left (\frac{15 \,{\left (4 \, A - 4 i \, B\right )} a^{3} c}{\sqrt{-i \, c \tan \left (f x + e\right ) + c}} - \frac{3 i \,{\left (-i \, c \tan \left (f x + e\right ) + c\right )}^{\frac{5}{2}} B a^{3} +{\left (-i \, c \tan \left (f x + e\right ) + c\right )}^{\frac{3}{2}}{\left (5 \, A - 25 i \, B\right )} a^{3} c - \sqrt{-i \, c \tan \left (f x + e\right ) + c}{\left (60 \, A - 120 i \, B\right )} a^{3} c^{2}}{c^{2}}\right )}}{15 \, c f} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+I*a*tan(f*x+e))^3*(A+B*tan(f*x+e))/(c-I*c*tan(f*x+e))^(1/2),x, algorithm="maxima")

[Out]

-2/15*I*(15*(4*A - 4*I*B)*a^3*c/sqrt(-I*c*tan(f*x + e) + c) - (3*I*(-I*c*tan(f*x + e) + c)^(5/2)*B*a^3 + (-I*c
*tan(f*x + e) + c)^(3/2)*(5*A - 25*I*B)*a^3*c - sqrt(-I*c*tan(f*x + e) + c)*(60*A - 120*I*B)*a^3*c^2)/c^2)/(c*
f)

________________________________________________________________________________________

Fricas [A]  time = 1.13645, size = 359, normalized size = 2.56 \begin{align*} \frac{\sqrt{2}{\left ({\left (-60 i \, A - 60 \, B\right )} a^{3} e^{\left (6 i \, f x + 6 i \, e\right )} +{\left (-300 i \, A - 420 \, B\right )} a^{3} e^{\left (4 i \, f x + 4 i \, e\right )} +{\left (-400 i \, A - 560 \, B\right )} a^{3} e^{\left (2 i \, f x + 2 i \, e\right )} +{\left (-160 i \, A - 224 \, B\right )} a^{3}\right )} \sqrt{\frac{c}{e^{\left (2 i \, f x + 2 i \, e\right )} + 1}}}{15 \,{\left (c f e^{\left (4 i \, f x + 4 i \, e\right )} + 2 \, c f e^{\left (2 i \, f x + 2 i \, e\right )} + c f\right )}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+I*a*tan(f*x+e))^3*(A+B*tan(f*x+e))/(c-I*c*tan(f*x+e))^(1/2),x, algorithm="fricas")

[Out]

1/15*sqrt(2)*((-60*I*A - 60*B)*a^3*e^(6*I*f*x + 6*I*e) + (-300*I*A - 420*B)*a^3*e^(4*I*f*x + 4*I*e) + (-400*I*
A - 560*B)*a^3*e^(2*I*f*x + 2*I*e) + (-160*I*A - 224*B)*a^3)*sqrt(c/(e^(2*I*f*x + 2*I*e) + 1))/(c*f*e^(4*I*f*x
 + 4*I*e) + 2*c*f*e^(2*I*f*x + 2*I*e) + c*f)

________________________________________________________________________________________

Sympy [F]  time = 0., size = 0, normalized size = 0. \begin{align*} a^{3} \left (\int \frac{A}{\sqrt{- i c \tan{\left (e + f x \right )} + c}}\, dx + \int - \frac{3 A \tan ^{2}{\left (e + f x \right )}}{\sqrt{- i c \tan{\left (e + f x \right )} + c}}\, dx + \int \frac{B \tan{\left (e + f x \right )}}{\sqrt{- i c \tan{\left (e + f x \right )} + c}}\, dx + \int - \frac{3 B \tan ^{3}{\left (e + f x \right )}}{\sqrt{- i c \tan{\left (e + f x \right )} + c}}\, dx + \int \frac{3 i A \tan{\left (e + f x \right )}}{\sqrt{- i c \tan{\left (e + f x \right )} + c}}\, dx + \int - \frac{i A \tan ^{3}{\left (e + f x \right )}}{\sqrt{- i c \tan{\left (e + f x \right )} + c}}\, dx + \int \frac{3 i B \tan ^{2}{\left (e + f x \right )}}{\sqrt{- i c \tan{\left (e + f x \right )} + c}}\, dx + \int - \frac{i B \tan ^{4}{\left (e + f x \right )}}{\sqrt{- i c \tan{\left (e + f x \right )} + c}}\, dx\right ) \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+I*a*tan(f*x+e))**3*(A+B*tan(f*x+e))/(c-I*c*tan(f*x+e))**(1/2),x)

[Out]

a**3*(Integral(A/sqrt(-I*c*tan(e + f*x) + c), x) + Integral(-3*A*tan(e + f*x)**2/sqrt(-I*c*tan(e + f*x) + c),
x) + Integral(B*tan(e + f*x)/sqrt(-I*c*tan(e + f*x) + c), x) + Integral(-3*B*tan(e + f*x)**3/sqrt(-I*c*tan(e +
 f*x) + c), x) + Integral(3*I*A*tan(e + f*x)/sqrt(-I*c*tan(e + f*x) + c), x) + Integral(-I*A*tan(e + f*x)**3/s
qrt(-I*c*tan(e + f*x) + c), x) + Integral(3*I*B*tan(e + f*x)**2/sqrt(-I*c*tan(e + f*x) + c), x) + Integral(-I*
B*tan(e + f*x)**4/sqrt(-I*c*tan(e + f*x) + c), x))

________________________________________________________________________________________

Giac [F]  time = 0., size = 0, normalized size = 0. \begin{align*} \int \frac{{\left (B \tan \left (f x + e\right ) + A\right )}{\left (i \, a \tan \left (f x + e\right ) + a\right )}^{3}}{\sqrt{-i \, c \tan \left (f x + e\right ) + c}}\,{d x} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+I*a*tan(f*x+e))^3*(A+B*tan(f*x+e))/(c-I*c*tan(f*x+e))^(1/2),x, algorithm="giac")

[Out]

integrate((B*tan(f*x + e) + A)*(I*a*tan(f*x + e) + a)^3/sqrt(-I*c*tan(f*x + e) + c), x)